<?php
  add_action('admin_menu', 'myconfig_admins_ticket');
  function myconfig_admins_ticket()
  {   
     add_menu_page( 'Tickets', 'Tickets', 'administrator', 'tickets-setting', 'tickets_theme_setting');
  }  
  function tickets_theme_setting()
  {
  	$myurl = get_bloginfo('home')."/wp-admin/admin.php?page=tickets-setting";
  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<title>Order Detail</title>
		
	<link href="<?php bloginfo('template_url');?>/orders/css/style.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/orders.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/tabcontent.css" rel="stylesheet" type="text/css" />
	<!-- 
	<script src="<?php bloginfo('template_url');?>/admins/js/tabcontent.js" 			type="text/javascript" ></script>  
	 -->		
	</head>	
	<body>			
			<div id="my_theme_options_content" style="width: 98%;">
                <!-- Tab choosen -->
                
		   <ul id="countrytabs" class="shadetabs">          
		       <li><a <?php echo 'class="tour-menu-active"';?> href="<?php echo $myurl;?>&action=ticket" >Tickets Booked</a></li> 
		       <li><a <?php echo 'class="tour-menu-active"';?> href="<?php echo $myurl;?>&action=des" >Destination</a></li> 	 	
		           	 	
           </ul>
           <!-- End Tab choosen -->   
           <div class="box-tabs">    
           <?php  
           ## delete item
           if(isset($_GET['del'])!=null && isset($_GET['customer'])!=null)
           {
           		$ticket = $_GET['del'];
           		$customerid = $_GET['customer'];
           		db_delete_ticket_by_id($ticket,$customerid);
           		wp_redirect($myurl);
           }
           else if(isset($_GET['ticket'])!=null && isset($_GET['customer'])!=null)
           {
           		include TEMPLATEPATH.'/orders/ticket/view-detail-update-ticket.php';
           }
 		   else if(isset($_GET['page'])=="tickets-setting" && $_GET['action'] == "des")
           {
           		include TEMPLATEPATH.'/orders/ticket/view-destination-ticket.php';
           }
           else 
	          {
	          	include TEMPLATEPATH.'/orders/ticket/view-ticket-booked.php';
	          }         
           ?>
                                
            <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->	                    
	       </div>		             					             
    	</div>
    	</body>
	</html>
  <?php 	
  }
?>